import { get } from '../../utils/request'
const state = {
  article: [],
  total: 0
}

const actions = {
  // 分页获取所有推荐学生风采信息
  findAllArticle(context, list) {
    get('/article/findAllRecommend', list).then((res) => {
      let response = res.data.list
      context.commit('setArticle', response)
      let total = res.data.total
      context.commit('setTotal', total)
    })
  },
  saveArticle(context, from) {
    let response = post('/article/saveOrUpdate', from)
    return response
  }
}

const mutations = {

}

export default {
  namespaced: true,
  state,
  actions,
  mutations
}
